<script lang="ts" setup>
import ProductBox from "../Common/ProductBox.vue";
import { ref } from "vue";
import type { Dayjs } from "dayjs";
type RangeValue = [Dayjs, Dayjs];

const value5 = ref<string>("Option1");
const value6 = ref<string>("");
const value1 = ref<RangeValue>();
const year = ref<Dayjs>();

const dataSource = [
  {
    key: "1",
    no: 2,
    relate: "11111",
    status: ".....",
    applyTime: "2020-04-05",
  },
];

const columns = [
  {
    title: "合同编号",
    dataIndex: "no",
    key: "no",
  },
  {
    title: "关联订单",
    dataIndex: "relate",
    key: "relate",
  },
  {
    title: "申请时间",
    dataIndex: "applyTime",
    key: "applyTime",
  },
  {
    title: "状态",
    dataIndex: "status",
    key: "status",
  },

  {
    title: "操作",
    dataIndex: "operation",
    key: "operation",
  },
];

</script>
<template>
  <div class="pr-5 pl-5">
    <ProductBox title="合同列表">
      <template #default>
        <div class="flex justify-between flex-wrap">
          <router-link to="/finance/applyContract">
            <a-button type="primary" class="mb-5">申请合同</a-button>
          </router-link>
          <div class="flex mb-5 flex-wrap">
            <div class="flex w-100 mb-5">
              <a-input-group compact>
                <div class="flex whitespace-nowrap">
                  <a-select v-model:value="value5">
                    <a-select-option value="Option1">合同编号</a-select-option>
                  </a-select>
                  <a-input v-model:value="value6" style="width: 70%" />
                </div>
              </a-input-group>
            </div>
            <a-date-picker v-model:value="year" picker="year" class="mb-5" />
            <a-range-picker v-model:value="value1" class="mb-5" />
            <a-button type="text">
              <img src="/console/downloadIcon.png" alt="" class="w-5 h-5" />
            </a-button>
          </div>
        </div>

        <a-table :scroll="{ x: 1000, }" :dataSource="dataSource" :columns="columns" />
      </template>
    </ProductBox>
  </div>
</template>
<style lang="scss" scoped></style>
